package com.ruoyi.shangpinfenlei.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shangpinfenlei.mapper.WxCategoryMapper;
import com.ruoyi.shangpinfenlei.domain.WxCategory;
import com.ruoyi.shangpinfenlei.service.IWxCategoryService;

/**
 * 商品分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class WxCategoryServiceImpl implements IWxCategoryService 
{
    @Autowired
    private WxCategoryMapper wxCategoryMapper;

    /**
     * 查询商品分类
     * 
     * @param categoryId 商品分类主键
     * @return 商品分类
     */
    @Override
    public WxCategory selectWxCategoryByCategoryId(Long categoryId)
    {
        return wxCategoryMapper.selectWxCategoryByCategoryId(categoryId);
    }

    /**
     * 查询商品分类列表
     * 
     * @param wxCategory 商品分类
     * @return 商品分类
     */
    @Override
    public List<WxCategory> selectWxCategoryList(WxCategory wxCategory)
    {
        return wxCategoryMapper.selectWxCategoryList(wxCategory);
    }

    /**
     * 新增商品分类
     * 
     * @param wxCategory 商品分类
     * @return 结果
     */
    @Override
    public int insertWxCategory(WxCategory wxCategory)
    {
        return wxCategoryMapper.insertWxCategory(wxCategory);
    }

    /**
     * 修改商品分类
     * 
     * @param wxCategory 商品分类
     * @return 结果
     */
    @Override
    public int updateWxCategory(WxCategory wxCategory)
    {
        return wxCategoryMapper.updateWxCategory(wxCategory);
    }

    /**
     * 批量删除商品分类
     * 
     * @param categoryIds 需要删除的商品分类主键
     * @return 结果
     */
    @Override
    public int deleteWxCategoryByCategoryIds(Long[] categoryIds)
    {
        return wxCategoryMapper.deleteWxCategoryByCategoryIds(categoryIds);
    }

    /**
     * 删除商品分类信息
     * 
     * @param categoryId 商品分类主键
     * @return 结果
     */
    @Override
    public int deleteWxCategoryByCategoryId(Long categoryId)
    {
        return wxCategoryMapper.deleteWxCategoryByCategoryId(categoryId);
    }
}
